From: Jason Rumney Date: Sat, 29 Sep 2007 21:33:23 +0000 (+0000) Subject: (w32_get_resource): Always close registry keys. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~18855^2~1390 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=4da4d9bb7688ab848ca8f7038c40da2263303599;p=emacs.git (w32_get_resource): Always close registry keys. --- diff --git a/src/w32.c b/src/w32.c index eaad69010f8..2b54f3d59dc 100644 --- a/src/w32.c +++ b/src/w32.c @@ -890,6 +890,7 @@ w32_get_resource (key, lpdwtype) && (lpvalue = (LPBYTE) xmalloc (cbData)) != NULL && RegQueryValueEx (hrootkey, key, NULL, lpdwtype, lpvalue, &cbData) == ERROR_SUCCESS) { + RegCloseKey (hrootkey); return (lpvalue); } @@ -906,6 +907,7 @@ w32_get_resource (key, lpdwtype) && (lpvalue = (LPBYTE) xmalloc (cbData)) != NULL && RegQueryValueEx (hrootkey, key, NULL, lpdwtype, lpvalue, &cbData) == ERROR_SUCCESS) { + RegCloseKey (hrootkey); return (lpvalue); }